﻿@using KRM.Core

@model KRM.Core.tblKRMWOutboundCentre
<div class="form-horizontal">
    <div class="alert note-info" style="max-height: 400px; overflow-y: auto">
        @*<h3 class="form-section" style="margin-top: 0px">Request Info </h3>*@
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-4">Customer Name:</label>
                    <div class="col-md-8">
                        <p class="form-control-static">@Model.CustomerName</p>
                    </div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-4">Status:</label>
                    <div class="col-md-8 book-status">
                        @{
                            var statusclass = "";
                            switch (Model.StatusId)
                            {
                                case (int)WOutboundCentreStatus.Pending:
                                    statusclass = "label label-success";
                                    break;
                                case (int)WOutboundCentreStatus.Completed:
                                    statusclass = "label  label-info";
                                    break;
                                case (int)WOutboundCentreStatus.Declined:
                                    statusclass = "label  label-danger";
                                    break;
                                default:
                                    statusclass = "label  label-default";
                                    break;
                            }
                        }
                        <span class="@statusclass">@Model.tblKRMWOutboundCentreStatu.Name</span>
                    </div>
                </div>
            </div>
            <!--/span-->

            <!--/span-->
        </div>
        <!--/row-->
        <div class="row">
            <!--/span-->
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-4">Email Address:</label>
                    <div class="col-md-8">
                        <p style="cursor:pointer;" class="form-control-static" onclick="window.location.href='mailto:@(Model.EmailAddress)';">@Model.EmailAddress <i class="icon-share-alt"></i></p>
                    </div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-4">Type:</label>
                    <div class="col-md-8">
                        <p class="form-control-static">@Model.tblKRMWOutboundCentreType.Name</p>
                    </div>
                </div>
            </div>
            <!--/span-->
        </div>
        <!--/row-->
        <div class="row">
            <!--/span-->
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-4">Telephone 1:</label>
                    <div class="col-md-8">
                        <p class="form-control-static">@Model.Telephone1</p>
                    </div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-4">Telephone 2:</label>
                    <div class="col-md-8">
                        <p class="form-control-static">@Model.Telephone2</p>
                    </div>
                </div>
            </div>
            <!--/span-->
        </div>
        <!--/row-->
    <div class="row">
        <div class="col-md-6">
            <div class="form-group">
                <label class="control-label col-md-4">Date Created:</label>
                <div class="col-md-8">
                    <p class="form-control-static">@((Model.DateCreated ?? DateTime.Now).ToString("MM/dd/yyyy"))</p>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="control-label col-md-4">Date Request:</label>
                <div class="col-md-8">
                    <p class="form-control-static">@(Model.RequestDate == null ? "" : ((DateTime)Model.RequestDate).ToString("MM/dd/yyyy"))</p>
                </div>
            </div>
        </div>
    </div>
         @if (Model.UserApproved != null)
         {
             <div class="row">
                 <div class="col-md-6">
                     <div class="form-group">
                         <label class="control-label col-md-4">User Approved:</label>
                         <div class="col-md-8">
                             <p class="form-control-static">@(Model.UserApproved.Username)</p>
                         </div>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="form-group">
                         <label class="control-label col-md-4">Date Approved:</label>
                         <div class="col-md-8">
                             <p class="form-control-static">@(Model.DateApproved == null ? "" : ((DateTime) Model.DateApproved).ToString("MM/dd/yyyy"))</p>
                         </div>
                     </div>
                 </div>
             </div>
             if (Model.StatusId==(int) WOutboundCentreStatus.Completed)
             {
            <div class="row">
                 <div class="col-md-6">
                     <div class="form-group">
                         <label class="control-label col-md-4">Action:</label>
                         <div class="col-md-8">
                             <p class="form-control-static">@(Model.tblKRMWOutboundCentreAction.Name)</p>
                         </div>
                     </div>
                 </div>
             </div>
             }
         }
        
        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label class="control-label col-md-2">Details Info:</label>
                    <div class="col-md-10">
                        <p class="form-control-static">@Html.Raw((Model.RequestInfo ?? " ").Replace("\r\n", "</br>"))</p>
                    </div>
                </div>
            </div>
        </div>
                 @if (!string.IsNullOrEmpty(Model.OtherComment))
                 {
                     <div class="row">
                         <div class="col-md-12">
                             <div class="form-group">
                                 <label class="control-label col-md-2">Comment:</label>
                                 <div class="col-md-10">
                                     <p class="form-control-static">@Html.Raw((Model.OtherComment ?? " ").Replace("\r\n", "</br>"))</p>
                                 </div>
                             </div>
                         </div>
                     </div>
                 }
    </div>
</div>
